<?php
namespace app\home\controller;

use app\home\controller\CommonController;

class Index extends Common
{
    public function index()
    {
        $this->view->engine->layout(false);
        return $this->fetch();
    }

    public function about()
    {
        return $this->fetch();
    }

    public function contact()
    {
        return $this->fetch();
    }

    public function culture()
    {
        return $this->fetch();
    }

    public function track()
    {
        return $this->fetch();
    }

    public function search()
    {
        return $this->fetch();
    }

    public function standard()
    {
        return $this->fetch();
    }

    public function product()
    {
        return $this->fetch();
    }

    public function lipei()
    {
        return $this->fetch();
    }

    public function person(){
        if(!session('?userName') || ((time()-session('userExpire')) > config('session.expire'))){
            $this->redirect('home/login/index');
        }
        $userInfo = db('user')->field('user_name,sex,area_code,tel,address')->where(['id'=>session('userId')])->find();

        $this->assign('userInfo',$userInfo);
        return $this->fetch();
    }

    public function send(){
        if(!session('?userName') || ((time()-session('userExpire')) > config('session.expire'))){
            $this->redirect('home/login/index');
        }
        return $this->fetch();
    }
}
